package com.li.utilstest.dialog

import android.content.Context
import com.li.utilstest.R
import com.lxj.xpopup.core.BottomPopupView
import kotlinx.android.synthetic.main.delete_bottom_dialog.view.*

/**
 * @author : liyun
 * @ClassName: DeleteBottomDialog
 * @Package com.li.utilstest.dialog
 * @Description:
 * @company: 深圳君南信息系统有限公司
 * @date 2021/7/11 14:37
 * @version v1.0
 */
class DeleteBottomDialog(context: Context) : BottomPopupView(context) {
    override fun getImplLayoutId(): Int = R.layout.delete_bottom_dialog
    override fun onCreate() {
        super.onCreate()
        delete.setOnClickListener {
            l?.delete()
            dismiss()
        }
        cancel.setOnClickListener { dismiss() }
    }

    var l:OnDeleteClick?=null

    fun setOnDeleteClick(l:OnDeleteClick){
        this.l=l
    }

    interface OnDeleteClick{
        fun delete()
    }
}